home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.metal;
-
- import com.sun.java.swing.Icon;
- import java.awt.Component;
- import java.awt.Graphics;
- import java.io.Serializable;
-
- public class MetalIconFactory$TreeControlIcon implements Icon, Serializable {
- protected boolean isLight;
-
- public MetalIconFactory$TreeControlIcon(boolean isLight) {
- this.isLight = isLight;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y) {
- g.translate(x, y);
- g.setColor(this.isLight ? MetalLookAndFeel.getPrimaryControl() : MetalLookAndFeel.getPrimaryControlDarkShadow());
- g.fillRect(1, 1, 6, 6);
- g.setColor(MetalLookAndFeel.getPrimaryControlInfo());
- g.drawLine(0, 2, 0, 5);
- g.drawLine(1, 1, 1, 1);
- g.drawLine(2, 0, 5, 0);
- g.drawLine(6, 1, 6, 1);
- g.drawLine(7, 2, 7, 5);
- g.drawLine(6, 6, 6, 6);
- g.drawLine(2, 7, 5, 7);
- g.drawLine(1, 6, 1, 6);
- g.setColor(this.isLight ? MetalLookAndFeel.getPrimaryControlHighlight() : MetalLookAndFeel.getPrimaryControlShadow());
- g.drawLine(1, 2, 1, 5);
- g.drawLine(2, 1, 5, 1);
- g.translate(-x, -y);
- }
-
- public int getIconWidth() {
- return MetalIconFactory.access$treeControlSize().width;
- }
-
- public int getIconHeight() {
- return MetalIconFactory.access$treeControlSize().height;
- }
- }
-